public class demo7 {
    public static void main(String[] args) {
        int shoe=58,cloth=30;
        float bag=55.8f;
        float all=500f;
        System.out.print(all-(shoe)-3*cloth-5*bag);


    }
}
